﻿<UserControl x:Class="Galnote.Header"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="1200">

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="1*"/>
			<RowDefinition Height="33"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="0.15*"/>
			<ColumnDefinition Width="0.05*"/>
			<ColumnDefinition Width="0.3*"/>
			<ColumnDefinition Width="0.4*"/>
		</Grid.ColumnDefinitions>
		<!--网站Logo-->
		<HyperlinkButton Style="{StaticResource ResourceKey=GenericHBStyle}" NavigateUri="/IndexPage/Body.xaml">
		<TextBlock Style="{StaticResource ResourceKey=HeaderLogoStyle}" Text="萌文化研究社"/>
		</HyperlinkButton>
		<!--Avatar UserID Sign-->
		<StackPanel Grid.Column="1" Grid.RowSpan="3">
			<Path Stroke="#FF555555" Data="M0,0 0,30z" Margin="0,20,0,0" HorizontalAlignment="Left"/>
		</StackPanel>
		<ContentControl x:Name="HeaderUserID" Grid.Column="2" HorizontalAlignment="Left" Loaded="HeaderUserID_Loaded">
			<ContentControl.ContentTemplate>
				<DataTemplate>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<Image Grid.RowSpan="2" Style="{StaticResource ResourceKey=GenericAvatarStyle}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,8,0,0" Width="64" Height="64" Source="{Binding Path=Avatar}"/>
						<Border Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,5">
							<TextBlock Style="{StaticResource ResourceKey=HeaderUserIDStyle}" Text="{Binding Path=UserID}"/>
						</Border>
						<Border Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="8,0,0,0">
							<TextBox Style="{StaticResource ResourceKey=HeaderSignStyle}" Text="{Binding Path=Sign}"/>
						</Border>
					</Grid>
				</DataTemplate>
			</ContentControl.ContentTemplate>
		</ContentControl>
		<!--Header Settings & Search-->
		<Grid Grid.Column="3" HorizontalAlignment="Right" MaxWidth="261" Margin="0,0,50,0">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="1*"/>
				<ColumnDefinition Width="30"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="25"/>
				<RowDefinition Height="1*"/>
			</Grid.RowDefinitions>
			<!--Settings-->
			<StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">
				<HyperlinkButton Name="MailBox" Style="{StaticResource ResourceKey=TopMailBoxStyle}" Loaded="MailBox_Loaded"/>
				<HyperlinkButton Name="SetBox" Style="{StaticResource ResourceKey=TopSettingsStyle}" Loaded="SetBox_Loaded" />
				<HyperlinkButton Name="Management" Style="{StaticResource ResourceKey=TopSettingsStyle}" Loaded="Management_Loaded"/>
				<HyperlinkButton Name="Quit" Style="{StaticResource ResourceKey=TopSettingsStyle}" Loaded="Quit_Loaded" />
				<HyperlinkButton Name="Register" Style="{StaticResource ResourceKey=TopSettingsStyle}" Loaded="Register_Loaded" NavigateUri="/IndexPage/Entrance.xaml"/>
				<TextBlock Name="Cut" Style="{StaticResource ResourceKey=TopSettingCutStyle}" Text="{Binding Path=Set}" Loaded="Cut_Loaded" />
				<HyperlinkButton Name="Login" Style="{StaticResource ResourceKey=TopSettingsStyle}" Loaded="Login_Loaded" NavigateUri="/Login/Login.xaml" TargetName="BodyPage"/>
			</StackPanel>
			<!--Search-->
			<TextBox Grid.Row="1" Style="{StaticResource ResourceKey=TopSearchTBStyle}" Text="内容" VerticalAlignment="Bottom"/>
			<Border Grid.Column="1" Grid.Row="1" Style="{StaticResource ResourceKey=TopSearchBrStyle}" VerticalAlignment="Bottom">
				<HyperlinkButton Style="{StaticResource ResourceKey=TopSearchHBStyle}">
					<HyperlinkButton.Content>
						<StackPanel Width="30" Height="29">
							<Ellipse x:Name="TopSearchEllipse" Stretch="Fill" StrokeLineJoin="Round" Height="15" Width="15" StrokeThickness="2" Margin="5,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Stroke="White" />
							<Path x:Name="TopSearchLine" Stretch="Fill" StrokeLineJoin="Round" Width="7" Height="8" Data="F1 M 0.5,0.5L 52.5,51.5" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15,-4,0,0" Fill="White" Stroke="White" StrokeThickness="2" UseLayoutRounding="False"/>
						</StackPanel>
					</HyperlinkButton.Content>
				</HyperlinkButton>
			</Border>
		</Grid>
		<StackPanel Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Orientation="Horizontal">
		<HyperlinkButton Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericHBStyle}" Content="上传" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" NavigateUri="/Upload/Upload.xaml"/>
		<HyperlinkButton Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericHBStyle}" Content="管理" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" NavigateUri="/Upload/UploadEdit.xaml"/>
			<HyperlinkButton Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericHBStyle}" Content="个人中心" Width="75" HorizontalAlignment="Left" VerticalAlignment="Center" NavigateUri="/AboutMe/PersonalCenter.xaml"/>
		</StackPanel>

		<!--ToolBar @ ListBox Content
		<ListBox x:Name="ToolbarContent" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ResourceKey=GenericLBStyle}" Loaded="ListBoxContent_Loaded">
			<ListBox.ItemContainerStyle>
				<Style TargetType="ListBoxItem">
					<Setter Property="Cursor" Value="Hand"/>
					<Setter Property="HorizontalContentAlignment" Value="Left"/>
					<Setter Property="Template" Value="{StaticResource ResourceKey=HeaderToolbarLBITemplate}"/>
				</Style>
			</ListBox.ItemContainerStyle>
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<StackPanel Orientation="Horizontal"/>
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
		</ListBox>
		-->
	</Grid>
</UserControl>
